interface names {
  oneName: string
  twoName?: string
}

export function pathMapBreadcrumb(menuList: any[], path: string): names {
  const names: names = {
    oneName: "首页"
  }
  menuList.forEach((oneMenu: any) => {
    oneMenu.children.forEach((twoMenu: any) => {
      if (twoMenu.path === path) {
        names.oneName = oneMenu.name
        names.twoName = twoMenu.name
        return names
      }
    })
  })
  return names
}
